# 这里只做最基本的启动文件
from flask_script import Manager
from flask_migrate import Migrate,MigrateCommand
# 从info文件_init_导入
from info import create_app,db
# 导入models
from info import models

# 创建app并传入配置模式：development/production
app  = create_app('development')

# 使用flask_script 管理app
manager = Manager(app)
# 关联app和db
Migrate(app,db)
# 添加迁移命令manage.py:15
manager.add_command('db',MigrateCommand)



if __name__ == '__main__':
    manager.run()